package com.itheima.demo4;

import java.util.Scanner;

public interface Eatable1 {
    String eat(int week);
}

class Test{
    public static void main(String[] args) {
        //useEatable1(() -> {return "辣子夹馍";});
        useEatable1((int week) -> {
            if (week <= 5 && week >= 1){
                return "快餐";
            }else if (week <=7 && week >=6){
                return "肉";
            }else {
                return "奥利给";
            }
        });

    }
    public static void useEatable1(Eatable1 eatable){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入今天周几:");
        int week = sc.nextInt();
        String food = eatable.eat(week);
        System.out.println("周"+week+"吃"+food);
    }
}

